<template>
  <div class="me-card">
    <div class="in">
      <div class="top">
        <img src="~assets/img/touxiang.png" alt="">
        <span class="name">
          栗子李子和梨子
          <span class="person">
            超级会员
          </span>
        </span>
        <span class="grade">
          lV2
        </span>
      </div>
      <div class="bottom">
        <div v-for="(item,index) in list" :key="index" class="item">
          <p style="font-size:1.5rem">{{item.num}}</p>
          <p>{{item.name}}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'meCard',
  data () {
    return {
      list: [
        {name: '积分', num: 103},
        {name: '优惠券', num: 6},
        {name: '钱包', num: '￥28.00'},
      ]
    }
  },
}
</script>

<style scoped lang="scss">
.me-card {
  width: 100%;
  padding: 1rem 0px;
  .in {
    width: 95%;
    height: 12rem;
    border-radius: 1rem;
    margin: 0 auto;
    background-color: #b22222;
    .top {
      position: relative;
      img {
        border-radius: 3rem;
        width: 5rem;
        height: 5rem;
        margin: 1rem 1rem;
      }
      .name {
        color: #fff;
        font-size: 1.2rem;
        position: relative;
        bottom:4rem;
        right:0.5rem;
      }
      .grade {
        background-color: #fff;
        color: #b22222;
        padding: 0 0.7rem;
        font-size: 1rem;
        height: 0.5;
        border-radius: 1rem;
        position: absolute;
        bottom: 2rem;
        left: 6.5rem;
      }
      .person {
        color: #fff;
        font-size: 0.8rem;
      }
    }
    .bottom {
      display: flex;
      justify-content: space-around;
      .item {
        flex: 1;
        p {
          text-align: center;
          margin: 0.1rem 0rem;
          color: #fff;
        }
      }
    }
  }
}
</style>
